import Vue from 'vue'
import Router from 'vue-router'
import shops from '@/security/shops'
import security from '@/security/security'
import protectors from '@/security/protectors'
import baiduMap from   '@/security/baiduMap'
import log from '@/security/log'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      redirect: { name: 'baiduMap'},
      children: [
        {
          path: '',
          name: 'default',
          redirect: '/baiduMap'
        },
        {
          path: 'baiduMap',
          name: 'baiduMap',
          component: baiduMap
        },
        {
          path: 'protectors',
          name: 'protectors',
          component: protectors
        },
        {
          path: 'log',
          name: 'log',
          component: log
        },
        {
          path: 'security/:shopid',
          name: 'security',
          component: security,
          props: true
        },
      ],
      name: 'root',
      component: shops
    },
  ]
});
